package oms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import oms.dao.RoleDAO;
import oms.dao.UserDAO;
import oms.entities.Role;
@Service
public class RoleServiceImpl implements RoleService {

	@Autowired
	private RoleDAO roleDAO;
	
	@Transactional
	public Role getRoleById(int roleId) {

		 return roleDAO.getRoleById(roleId);
	}

	@Transactional
	public Role getRoleByName(String name) {
		
		 return roleDAO.getRoleByName(name);
	}
}
